<?php
namespace app\index\logic;
use app\index\validate\User as UserValidate;

class RegisterLogic extends BaseLogic {

    /**
     * 检查注册规则
     * @param $params
     * @return mixed
     */
    public function check_register_rule($params){
        $validate = new UserValidate();
        $r = $validate->scene('add')->check($params);
        if(!$r){
            return $this->get_response(0,$validate->getError());
        }

        return $this->get_response(1,'OK');
    }
}